﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace TA.Turbo
{
	public enum BrowserType
	{
		IEBefore8,
		IE8OrLater,
		Firefox,
		Other,
	}
	public static class _HttpBrowserCapabilities_Extensions
	{
		public static BrowserType GetBrowserType(this HttpBrowserCapabilities This)
		{
			switch (This.Browser)
			{
				case "IE":
					if (This.MajorVersion < 8)
						return BrowserType.IEBefore8;
					else
						return BrowserType.IE8OrLater;
				case "Firefox":
					return BrowserType.Firefox;
				default:
					return BrowserType.Other;
			}
		}
	}
}
